import request from '@/utils/request'

// 列表
export function listUserBind(query) {
    return request({
        url: '/system/switchAccountNumber/list',
        method: 'get',
        params: query
    })
}

// 获取详细信息
export function getUserBind(id) {
    return request({
        url: '/system/switchAccountNumber/selectOne?id=' + id,
        method: 'get'
    })
}

// 新建
export function addUserBind(data) {
    return request({
        url: '/system/switchAccountNumber/insert',
        method: 'post',
        data: data
    })
}

// 编辑
export function editUserBind(data) {
    return request({
        url: '/system/switchAccountNumber/update',
        method: 'post',
        data: data
    })
}

// 删除
export function delUserBind(id) {
    return request({
        url: '/system/switchAccountNumber/deleteById?id=' + id,
        method: 'get'
    })
}

// 切换账号
export function toggleUserBind(id) {
    return request({
        url: '/system/switchAccountNumber/switchAccountNumber?id=' + id,
        method: 'get'
    })
}

// 获取切换账号列表
export function toggleListUserBind(query) {
    return request({
        url: '/system/switchAccountNumber/accountBound',
        method: 'get',
        params: query
    })
}